
function checkAge(age){

	var title = ["孩提","黄口","垂髫","束发","总角","弱冠","而立","不惑","知天命","花甲","古稀","耄耋","期颐","华诞"]; 
	
	if(typeof age == "number"){
		
		if(age >= 0 && age < 3){
			return title[0];
		}
		else if(age >= 3 && age < 6){
			return title[1];
		}
		else if(age >= 6 && age < 8){
			return title[2];
		}
		else if(age >= 8 && age < 16){
			return title[3];
		}
		else if(age >= 16 && age < 20){
			return title[4];
		}
		else if(age >= 20 && age < 30){
			return title[5];
		}
		else if(age >= 30 && age < 40){
			return title[6];
		}
		else if(age >= 40 && age < 50){
			return title[7];
		}
		else if(age >= 50 && age < 60){
			return title[8];
		}
		else if(age >= 60 && age < 70){
			return title[9];
		}
		else if(age >= 70 && age < 80){
			return title[10];
		}
		else if(age >= 80 && age < 90){
			return title[11];
		}
		else if(age >= 90 && age < 100){
			return title[12];
		}
		else if(age >= 100){
			return title[13];
		}
	}else{
		return "参数age必须是number类型！";
	}

}

module.exports = checkAge;